import app
import  requests


class IndexApi(object):
    def __init__(self):
        self.banner_url=app.URL + "/api/v1/banner/{}"
        self.theme_url = app.URL + "/api/v1/theme"

    def get_banner(self,banner_id):
       new_url = self.banner_url.format(banner_id)
       return  requests.get(new_url)

    def get_theme(self,ids):
        data = {"ids":ids}
        return  requests.get(self.theme_url,params=data)